package com.example.framework.glide.activity;

import android.app.Activity;
import android.os.Bundle;
import android.widget.TextView;

import androidx.recyclerview.widget.LinearLayoutManager;
import androidx.recyclerview.widget.RecyclerView;

import com.example.framework.R;
import com.example.framework.glide.adapter.GlideTranformationsAdapter;


public class GlideTranformationsActivity extends Activity
{
      TextView tvTitle;
      RecyclerView rvGlideTransformations;
      
      @Override
      protected void onCreate(Bundle savedInstanceState)
      {
            super.onCreate(savedInstanceState);
            
            setContentView(R.layout.activity_glide_tranformations);
            tvTitle = findViewById(R.id.tv_title);
            rvGlideTransformations = findViewById(R.id.rv_glide_transformations);
            
            initData();
      }
      
      private void initData()
      {
            tvTitle.setText("Glide图形变换");
            
            // 初始化Recyclerview
            GlideTranformationsAdapter glideTranformationsAdapter = new GlideTranformationsAdapter(this);
            rvGlideTransformations.setAdapter(glideTranformationsAdapter);
            rvGlideTransformations.setLayoutManager(new LinearLayoutManager(this, LinearLayoutManager.VERTICAL, false));
      }
}
